<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %> 
<%@ page import="data.BitacoraDataMapper" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="arivp89.css" media="screen" />
        <title>Reporte Final del Profesor</title>
    </head>
    <body>
        <%
        BitacoraDataMapper mapper = new BitacoraDataMapper();
        ResultSet rs = mapper.obtenerReporte(request.getSession().getAttribute("BitID").toString());
        
        %>
        <html:form action="/ReporteFinal" method="post" >
            <h1>Reporte Final Docente</h1><br><table border="0" cellspacing="15">
                <% if(rs.next()){ %>
                <thead>
                    <tr>
                        <th></th>
                        <th>Contenido actual:</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><textarea name="reporte" rows="20" cols="50"></textarea></td>
                        <td><% out.println(rs.getString(1)); %></td>
                    </tr>
                </tbody>
                
            </table>
            <% } %><br>
            <html:submit>Guardar Cambios</html:submit><html:errors />
        </html:form>
        <br><br>
        <html:link page="/ModificarBitacoraIndex.jsp"><- Atrás</html:link>
        <div id="bottom">
            Creado por: Alejandro Rivera, Franklin Alfaro. ECCI, UCR.
            <br>
        </div>
    </body>
</html>
